package br.com.simora.execucao;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name="log_captura")
public class LogCaptura implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1535348264860852701L;

	@Id
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    @Column(name="id")
    private Integer id;
	
	@Column(name="radio_id")
	private Integer radio;
	
	@Temporal( TemporalType.TIMESTAMP)
	@Column(name="data_hora_inicio")
	private Date dataHoraInicio;
	
	@Temporal( TemporalType.TIMESTAMP)
	@Column(name="data_hora_fim")
	private Date dataHoraFim;

	private String status;
	
	@Column(name="retorno_fp")
	private String retornoFP;
	
	@Column(name="path_arquivo")
	private String pathArquivo;
	
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getRadio() {
		return radio;
	}

	public void setRadio(Integer radio) {
		this.radio = radio;
	}

	public Date getDataHoraInicio() {
		return dataHoraInicio;
	}

	public void setDataHoraInicio(Date dataHoraInicio) {
		this.dataHoraInicio = dataHoraInicio;
	}

	public Date getDataHoraFim() {
		if(dataHoraFim == null){
			dataHoraFim = new Date();
		}
		return dataHoraFim;
	}

	public void setDataHoraFim(Date dataHoraFim) {
		this.dataHoraFim = dataHoraFim;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getRetornoFP() {
		return retornoFP;
	}

	public void setRetornoFP(String retornoFP) {
		this.retornoFP = retornoFP;
	}

	public String getPathArquivo() {
		return pathArquivo;
	}

	public void setPathArquivo(String pathArquivo) {
		this.pathArquivo = pathArquivo;
	}
	
}